#version 120

uniform float waveTime; 
uniform float waveWidth; 
uniform float waveHeight;

void main(void) 
{ 
	gl_TexCoord[0] = gl_MultiTexCoord0;

	vec4 v = vec4(gl_Vertex);

	float wave1 = sin(waveWidth * v.x + waveTime) * cos(waveWidth * v.y + waveTime) * waveHeight;

	float wave2 = cos(v.x + waveTime) * waveHeight;

	v.z = wave1 + wave2;

	gl_Position = gl_ModelViewProjectionMatrix * v; 
}